package com.ethink.order.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.TobSaleReturnDetailOrderInfo;
import com.ethink.order.api.info.TobSaleReturnOrderInfo;
import com.ethink.order.api.model.TobSaleReturnModeModel;
import com.ethink.order.api.model.TobSaleReturnModel;
import com.ethink.order.api.request.TobSaleReturnOrderAddRequest;
import com.ethink.order.api.request.TobSaleReturnOrderQueryRequest;
import com.ethink.order.api.request.TobSaleReturnOrderTakePlaceInsertQueryRequest;
import com.ethink.order.api.request.TobSaleReturnOrderUpdateRequest;
import com.ethink.order.api.response.TobSaleReturnQueryDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 预售退单 Facade接口
 *
 * @author default
 * @date 2022-12-08
 */
@FeignClient(name = "ethink-order-service", path = "order-service/facade/v1/tobSaleReturnOrder", contextId = "tobSaleReturnOrderFacade")
public interface TobSaleReturnOrderFacade {


    @PostMapping("add")
    @ResponseBody
    Boolean add(@RequestBody TobSaleReturnOrderAddRequest request);

    @PostMapping("pageQuery")
    @ResponseBody
    Page<TobSaleReturnModel> pageQuery(@RequestBody TobSaleReturnOrderQueryRequest request);

    @GetMapping("queryDetail")
    @ResponseBody
    TobSaleReturnQueryDetailResponse queryDetail(@RequestParam("id") Long id);

    @PostMapping("update")
    @ResponseBody
    Boolean update(@RequestBody TobSaleReturnOrderUpdateRequest request);

    @GetMapping("delete")
    @ResponseBody
    Boolean delete(@RequestParam("id") Long id);

    @GetMapping("pass")
    @ResponseBody
    Boolean pass(@RequestParam("id") Long id);

    @GetMapping("refuse")
    @ResponseBody
    Boolean refuse(@RequestParam("id") Long id);

    @GetMapping("queryDetailListByTobSaleOrderNo")
    @ResponseBody
    List<TobSaleReturnDetailOrderInfo> queryDetailListByTobSaleOrderNo(@RequestParam("tobSaleOrderNo") String tobSaleOrderNo);

    @PostMapping("/queryTobSaleReturnOrderDetailOrderNosByOrderNos")
    @ResponseBody
    List<String> queryTobSaleReturnOrderDetailOrderNosByOrderNos(@RequestBody List<String> orderNos);

    @PostMapping("/tobSaleReturnOrderTakePlaceInsert")
    @ResponseBody
    Boolean tobSaleReturnOrderTakePlaceInsert(@RequestBody TobSaleReturnOrderTakePlaceInsertQueryRequest request);

    @GetMapping("/selectOneTobSaleReturnOrderInfoById")
    @ResponseBody
    TobSaleReturnOrderInfo selectById(@RequestParam("id") Long id);

    @GetMapping("/tobSaleReturnOrderRevokeOrder")
    @ResponseBody
    Boolean tobSaleReturnOrderRevokeOrder(@RequestParam("id") Long id);

    @PostMapping("/pageModeQuery")
    @ResponseBody
    Page<TobSaleReturnModeModel> pageModeQuery(@RequestBody TobSaleReturnOrderQueryRequest request);

}